package com.pet.article.controller.v1;


import com.pet.article.service.ApCollectionService;
import com.pet.common.controller.AbstractController;
import com.pet.model.article.pojos.ApCollection;
import com.pet.model.article.pojos.ApCollectionDto;
import com.pet.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>
* APP收藏信息表 控制器</p>
*/
@RestController
@RequestMapping("/api/v1/collection")
public class ApCollectionController extends AbstractController<ApCollection> {

    @Autowired
    private ApCollectionService apCollectionService;

    //注入
    @Autowired
    public ApCollectionController(ApCollectionService apCollectionService) {
        super(apCollectionService);
        this.apCollectionService=apCollectionService;
    }

    /**
     * 收藏行为
     * @param dto
     * @return
     */
    @PostMapping("/collection_behavior")
    private ResponseResult CollectionBehavior(@RequestBody ApCollectionDto dto){
        return apCollectionService.collectionBehavior(dto);
    }

}

